package com.shop.mapper;

import com.shop.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface ProductMapper {
    List<Product> findAll();
    
    List<Product> findByShopId(Long shopId);
    
    Product findById(Long id);
    
    List<Product> search(@Param("keyword") String keyword);
    
    void insert(Product product);
    
    void update(Product product);
    
    void updateStock(@Param("id") Long id, @Param("stock") Integer stock);
    
    void delete(Long id);
} 